package com.ayuan.blog.service;

import com.ayuan.blog.bean.ArticleInfo;
import com.ayuan.blog.bean.ArticleSearchBean;
import com.ayuan.blog.bean.RecentArticleSearchBean;
import com.ayuan.blog.common.CrudServiceInterface;
import com.ayuan.blog.domain.Article;
import com.ayuan.blog.domain.sch.ArticleSch;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface ArticleService extends CrudServiceInterface<Article> {

    void saveArticleInfo(ArticleInfo articleInfo);

    ArticleInfo findArticleInfoByArticleId(Integer articleId);

    List<ArticleInfo> findAllArticleInfo();

    List<ArticleInfo> findRecentArticles(RecentArticleSearchBean recentArticleSearchBean);

    PageInfo<ArticleInfo> findPageArticleInfo(ArticleSch sch);

    PageInfo<ArticleInfo> findPageArticleInfoByConditions(ArticleSearchBean sch);

    void updateArticleInfo(ArticleInfo articleInfo);

    void delete(Integer articleId);

    void view(Integer articleId);
}